﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApp._Default" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">

    <style>
        td{
            width:120px;
            text-align:center;
        }
        th{
            text-align:center;
        }
        #hd{
            position:relative;
            width:500px;
            margin-top:20px;
            margin-bottom:10px;
        }
        #hd #right{
            position:absolute;
            right:0px;
            top:0Px;
        }
    </style>

    <div id="hd">
        <asp:Button ID="addBtn" runat="server" Text="添加" OnClick="addBtn_Click" />

        <div id="right">
            <asp:TextBox ID="selTxB" runat="server" placeholder="请输入……"></asp:TextBox>&nbsp;
            <asp:Button ID="selBtn" runat="server" Text="查询" OnClick="selBtn_Click" />&nbsp;
            <asp:Button ID="clBtn" runat="server" Text="清除条件查询" OnClick="clBtn_Click" />

        </div>
    </div>

    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" OnRowDeleting="GridView1_RowDeleting" DataKeyNames="Noteid">
        <Columns>
            <asp:BoundField DataField="Noteid" HeaderText="编号" SortExpression="Noteid" >
            <ItemStyle Width="30px" />
            </asp:BoundField>
            <asp:BoundField DataField="Keys" HeaderText="关键字" SortExpression="Keys" />
            <asp:BoundField DataField="Title" HeaderText="标题" SortExpression="Title" />
            <asp:BoundField DataField="Content" HeaderText="内容" SortExpression="Content" />
            <asp:CommandField ShowDeleteButton="True" DeleteText="&lt;span onclick=&quot;javaScript:return confirm('确定删除吗？');&quot;&gt;删除&lt;/span&gt;" />
        </Columns>
    </asp:GridView>

</asp:Content>
